package com.asm.service.impl;

import com.asm.mapper.SNVATACMapper;
import com.asm.pojo.SNVATAC;
import com.asm.service.SNVATACService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SNVATACServiceImpl implements SNVATACService {
    @Autowired
    private SNVATACMapper snvatacMapper;

    @Override
    public List<SNVATAC> getDetailAccessibleChromatinBySnv(String snv) {
        ArrayList<SNVATAC> result = new ArrayList<>();
        ArrayList<String> tables = new ArrayList<>();
        tables.add("detail_cis_atac_00");
        tables.add("detail_cis_atac_01");
        for (String table:
             tables) {
            result.addAll(snvatacMapper.getDetailAccessibleChromatinBySnv(snv,table));
        }
        return result;
    }
}
